package com.auto.admin.entity.bo.param;

import com.auto.admin.constants.Constants;
import com.auto.admin.entity.ApiInfo;
import com.auto.admin.entity.ParamMapping;
import java.util.List;
import lombok.Data;

/**
 * Description: SaveApiInfoBO
 * @author liangshf
 * @date 2019-04-30
 */
@Data
public class SaveApiInfoBO extends ApiInfo {

	private String code;

	/**
	 * torna 方法参数Api json
	 */
	private String tornaParamApiJson;

	/**
	 * torna 返回值Api json
	 */
	private String tornaResultApiJson;

	private List<ParamMapping> paramMappingList;

	public List<ParamMapping> getParamMappingList() {
		return paramMappingList;
	}

	public void setParamMappingList(List<ParamMapping> paramMappingList) {
		this.paramMappingList = paramMappingList;
	}

	public String getCode() {
		String [] codes = getControllerName().split(Constants.POINT);
		return getApplicationName() +"_"+ codes[codes.length -2];
	}

	public void setCode(String code) {
		this.code = code;
	}

}
